package com.aloha.springframework.test.bean.impl;

import com.aloha.springframework.beans.factory.annotation.Autowired;
import com.aloha.springframework.beans.factory.annotation.Qualifier;
import com.aloha.springframework.stereotype.Component;
import com.aloha.springframework.test.bean.IUserDao;
import com.aloha.springframework.test.bean.IUserService;

@Component
public class UserService implements IUserService {

    @Autowired
    @Qualifier("userDao")
    private IUserDao userDao;

    public String queryUserInfo(String id) {
        return userDao.queryUserName(id);
    }

    public UserService() {
    }

    public void testProxy() {
        System.out.println("测试代理方法");
    }

    public IUserDao getUserDao() {
        return userDao;
    }

    public void setUserDao(IUserDao userDao) {
        this.userDao = userDao;
    }


}
